package com.gh.manager.grade.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gh.manager.grade.mapper.GhGradeMapper;
import com.gh.manager.grade.domain.GhGrade;
import com.gh.manager.grade.service.IGhGradeService;

/**
 * 年级Service业务层处理
 * 
 * @author andas
 * @date 2024-12-29
 */
@Service
public class GhGradeServiceImpl implements IGhGradeService 
{
    @Autowired
    private GhGradeMapper ghGradeMapper;

    /**
     * 查询年级
     * 
     * @param gradeId 年级主键
     * @return 年级
     */
    @Override
    public GhGrade selectGhGradeByGradeId(Long gradeId)
    {
        return ghGradeMapper.selectGhGradeByGradeId(gradeId);
    }

    /**
     * 查询年级列表
     * 
     * @param ghGrade 年级
     * @return 年级
     */
    @Override
    public List<GhGrade> selectGhGradeList(GhGrade ghGrade)
    {
        return ghGradeMapper.selectGhGradeList(ghGrade);
    }

    /**
     * 新增年级
     * 
     * @param ghGrade 年级
     * @return 结果
     */
    @Override
    public int insertGhGrade(GhGrade ghGrade)
    {
        return ghGradeMapper.insertGhGrade(ghGrade);
    }

    /**
     * 修改年级
     * 
     * @param ghGrade 年级
     * @return 结果
     */
    @Override
    public int updateGhGrade(GhGrade ghGrade)
    {
        return ghGradeMapper.updateGhGrade(ghGrade);
    }

    /**
     * 批量删除年级
     * 
     * @param gradeIds 需要删除的年级主键
     * @return 结果
     */
    @Override
    public int deleteGhGradeByGradeIds(Long[] gradeIds)
    {
        return ghGradeMapper.deleteGhGradeByGradeIds(gradeIds);
    }

    /**
     * 删除年级信息
     * 
     * @param gradeId 年级主键
     * @return 结果
     */
    @Override
    public int deleteGhGradeByGradeId(Long gradeId)
    {
        return ghGradeMapper.deleteGhGradeByGradeId(gradeId);
    }
}
